package com.snails.app.base.mvp.model;

import com.snails.app.base.mvp.BaseAbstract;
import com.snails.app.base.mvp.presenter.AbstractPresenter;

/**
 * mvp-model, 持有P层
 *
 * @author lawrence
 * @date 2019-04-26 16:49
 */
public interface AbstractModel<P extends AbstractPresenter>
        extends BaseAbstract {

    /**
     * 注入P层
     */
    void onAttachP(P presenter);

    /**
     * 回收资源, 此方法在activity/fragment销毁时触发
     */
    void onDetach();

}
